package com.hrt.bean;

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * 礼品基本信息表
 */
@Entity
@Table(name = "gift_infor")
public class GiftInfor implements Serializable {//Serializable接口：序列化接口，把实体变成字节流的形式在网上传输，如果不继承就无法在网上传输

	private static final long serialVersionUID = 1L;

	/**
	 * 礼品ID
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "GI_ID", length = 500)
	private Long id;

	/**
	 * 礼品编号
	 */
	@Column(name = "GI_CODE", length = 500)
	private String giftCode;
	
	/**
	 * 礼品名称
	 */
	@Column(name = "GI_NAME", length = 500)
	private String giftName;
	
	/**
	 * 最小单位
	 */
	@Column(name = "UNIT", length = 500)
	private String unit;
	
	/**
	 * 描述
	 */
	@Column(name = "DESCRITION", length = 500)
	private String description;
	
	/**
	 * 成本价
	 */
	@Column(name = "ENTER", length = 500)
	private Double enterPrice = 0d;
	
	/**
	 * 零售价格
	 */
	@Column(name = "SALE_PRICE", length = 500)
	private Double salePrice = 0d;
	
	/**
	 * 折扣
	 */
	@Column(name = "DISCOUNT", length = 500)
	private Double discount;
	
	/**
	 * 促销价
	 */
	@Column(name = "PROMOTION", length = 500)
	private Double promotion = 0d;
	
	/**
	 * 团购价
	 */
	@Column(name = "GROUPS", length = 500)
	private Double groupPrice = 0d;
	
	/**
	 * 包邮价
	 */
	@Column(name = "MAIL_PRICE", length = 500)
	private Double mailPrice = 0d;
	
	/**
	 * 库存量
	 */
	@Column(name = "TOTALS", length = 500)
	private Long totals = 0l;
	
	/**
	 * 点击量
	 */
	@Column(name = "CLICK_COUNT", length = 500)
	private Long clickCount = 0l;
	
	/**
	 * 收藏量
	 */
	@Column(name = "COLLECTION", length = 500)
	private Long collection = 0l;
	
	/**
	 * 商品详情
	 */
	@Column(name = "DETAIL", length = 500)
	private String detail;
	
	/**
	 * 是否团购
	 */
	@Column(name = "ISGROUP", length = 500)
	private Integer isGroup = 0;
	
	/**
	 * 是否使用套餐 0不使用 1使用
	 */
	@Column(name = "ISPACKAGE", length = 500)
	private Integer isPackage = 0;
	
	/**
	 * 是否促销 0不进行促销 1促销
	 */
	@Column(name = "ISPROMOTE", length = 500)
	private Integer isPromote = 0;
	
	/**
	 * 是否包邮
	 */
	@Column(name = "ISMAIL", length = 500)
	private Integer isMail = 0;
	
	/**
	 * 产品主图片
	 */
	@Column(name = "PIC", length = 500)
	private String pic;
	
	/**
	 * 上下架状态 0 下架 1上架
	 */
	@Column(name = "ISPUSH", length = 500)
	private Integer ispush = 0;
	
	/**
	 * 产品录入人ID,关联后台用户表主键
	 */
	@Column(name = "CREATOR", length = 500)
	private Long creator;
	
	/**
	 * 录入人名称
	 */
	@Column(name = "CREATOR_NAME", length = 500)
	private String creatorName;
	
	/**
	 * 创建时间, 默认系统当前时间
	 */
	@Column(name = "CREATE_TIME", length = 500)
	private Timestamp createTime;
	
	/**
	 * 修改人,第一次插入数据时，修改人与创建人一致
	 */
	@Column(name = "EDITOR", length = 500)
	private String editorName;
	
	/**
	 * 产品修改人ID,关联后台用户表主键
	 */
	@Column(name = "EDITOR_ID", length = 500)
	private Long editorId;
	
	/**
	 * 最后修改时间,录入数据时，录入时间和最后修改时间一致
	 */
	@Column(name = "EDIT_TIME", length = 500)
	private Timestamp editTime;
	
	/**
	 * 删除标记 0未删除 1已删除
	 */
	@Column(name = "ISDELETE", length = 500)
	private Integer isdelete = 0;

	/**
	 *  大字段；商品详情
	 */
	@Lob
    @Column(name = "UEDITOR_DETAILS", columnDefinition = "BLOB")
	private byte[] ueditorDetails;
	
	@Transient
	private String details_Str;
	/**
	 * 构造函数
	 */
	public GiftInfor() {
	}
	
	
	/**
	 * get/set方法
	 * 
	 */
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}

	
	public String getGiftCode() {
		return giftCode;
	}

	public void setGiftCode(String giftCode) {
		this.giftCode = giftCode;
	}

	
	public String getGiftName() {
		return giftName;
	}
	public void setGiftName(String giftName) {
		this.giftName = giftName;
	}

	
	public String getUnit() {
		return unit;
	}
	public void setUnit(String unit) {
		this.unit = unit;
	}

	
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}

	
	public Double getEnterPrice() {
		return enterPrice;
	}
	public void setEnterPrice(Double enterPrice) {
		this.enterPrice = enterPrice;
	}

	
	public Double getSalePrice() {
		return salePrice;
	}
	public void setSalePrice(Double salePrice) {
		this.salePrice = salePrice;
	}

	
	public Double getDiscount() {
		return discount;
	}
	public void setDiscount(Double discount) {
		this.discount = discount;
	}

	
	public Double getPromotion() {
		return promotion;
	}
	public void setPromotion(Double promotion) {
		this.promotion = promotion;
	}

	
	public Double getGroupPrice() {
		return groupPrice;
	}
	public void setGroupPrice(Double groupPrice) {
		this.groupPrice = groupPrice;
	}

	
	public Double getMailPrice() {
		return mailPrice;
	}
	public void setMailPrice(Double mailPrice) {
		this.mailPrice = mailPrice;
	}

	
	public Long getTotals() {
		return totals;
	}
	public void setTotals(Long totals) {
		this.totals = totals;
	}

	
	public Long getClickCount() {
		return clickCount;
	}
	public void setClickCount(Long clickCount) {
		this.clickCount = clickCount;
	}

	
	public Long getCollection() {
		return collection;
	}
	public void setCollection(Long collection) {
		this.collection = collection;
	}

	
	public String getDetail() {
		return detail;
	}
	public void setDetail(String detail) {
		this.detail = detail;
	}

	
	public Integer getIsGroup() {
		return isGroup;
	}
	public void setIsGroup(Integer isGroup) {
		this.isGroup = isGroup;
	}

	
	public Integer getIsPackage() {
		return isPackage;
	}
	public void setIsPackage(Integer isPackage) {
		this.isPackage = isPackage;
	}

	
	public Integer getIsPromote() {
		return isPromote;
	}
	public void setIsPromote(Integer isPromote) {
		this.isPromote = isPromote;
	}

	
	public Integer getIsMail() {
		return isMail;
	}
	public void setIsMail(Integer isMail) {
		this.isMail = isMail;
	}

	
	public String getPic() {
		return pic;
	}
	public void setPic(String pic) {
		this.pic = pic;
	}

	
	public Integer getIspush() {
		return ispush;
	}
	public void setIspush(Integer ispush) {
		this.ispush = ispush;
	}

	
	public Long getCreator() {
		return creator;
	}
	public void setCreator(Long creator) {
		this.creator = creator;
	}

	
	public String getCreatorName() {
		return creatorName;
	}
	public void setCreatorName(String creatorName) {
		this.creatorName = creatorName;
	}
	
	
	public Timestamp getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}

	
	public String getEditorName() {
		return editorName;
	}
	public void setEditorName(String editorName) {
		this.editorName = editorName;
	}

	
	public Long getEditorId() {
		return editorId;
	}
	public void setEditorId(Long editorId) {
		this.editorId = editorId;
	}

	
	public Timestamp getEditTime() {
		return editTime;
	}
	public void setEditTime(Timestamp editTime) {
		this.editTime = editTime;
	}

	
	/*public Integer getIsDelete() {
		return isdelete;
	}
	public void setIsDelete(Integer isDelete) {
		this.isdelete = isDelete;
	}*/
	public Integer getIsdelete() {
		return isdelete;
	}
	public void setIsdelete(Integer isdelete) {
		this.isdelete = isdelete;
	}

	/**
	 * 大字段
	 * */
	public byte[] getUeditorDetails() {
		return ueditorDetails;
	}
	public void setUeditorDetails(byte[] ueditorDetails) {
		this.ueditorDetails = ueditorDetails;
	}


	public String getDetails_Str() {
		return details_Str;
	}


	public void setDetails_Str(String details_Str) {
		this.details_Str = details_Str;
	}



}